package com.hrms.hrms_employee.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hrms.hrms_employee.dto.*;
import com.hrms.hrms_employee.entity.StaffPosition;
import com.hrms.hrms_employee.entity.Station;
import com.hrms.hrms_employee.vo.stationDetail;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * 岗位表(Station)表数据库访问层
 *
 * @author makejava
 * @since 2025-01-15 13:55:34
 */
@Mapper
public interface StationDao extends BaseMapper<Station> {

    Page<stationDetail> pageInfo(@Param("page") Page<stationDetail> page, @Param("entity") Map<String, String> stationDetail);

    List<StaffPosition> selectManagerByDepartmentId(@Param("id") Long stationId);

    int countActiveEmployeesByDate(@Param("date") LocalDate monthFirst);

    int countNewEmployees(@Param("first") LocalDate monthFirst, @Param("last") LocalDate monthLast);

    int countLeftEmployees(@Param("first")LocalDate monthFirst, @Param("last") LocalDate monthLast);

    Integer selectEmployee(@Param("name") String name);

    List<EmployeeChangeDTO> emoloyeeChange(@Param("first")LocalDate preMonthFirst, @Param("last")LocalDate preMonthLast);

    List<AgeRangeStatDTO> getEmployeeAge();

    List<EducationDTO> getEmployeeEducation();

    List<WorkDTO> getEmployeeWorkDate();

    List<ContractTypeDTO> getEmployeeContractType();

    List<StationDTO> getStationEmployee();
}

